package com.airticketbooking.mapper;

import com.airticketbooking.common.domain.PageQuery;
import com.airticketbooking.po.Airport;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.domain.Page;

import java.util.List;


@Mapper
public interface AirportMapper {


	@Select("SELECT * FROM airticketbooking.airports WHERE airport_id = #{airportId}")
	Airport getAirportById(Integer airportId);


	Page<Airport> queryByPage(PageQuery query);

	@Select("SELECT * FROM airticketbooking.airports")
	List<Airport> getAirports();

}
